package main

import (
	"github.com/gin-gonic/gin"
	"github.com/spf13/viper"
	"user/bootstrap"
	"user/router"
)

func init() {
	bootstrap.Bootstrap()
}
func main() {
	debug := viper.GetBool("server.debug")
	port := viper.GetString("server.port")
	if !debug {
		gin.SetMode(gin.ReleaseMode)
	}

	//r := gin.Default()
	r := gin.New()
	r = router.Router(r)
	r.Run(":" + port)
}
